<!DOCTYPE html>
<html class="x-admin-sm">

<head>
    <meta charset="UTF-8">
    <title>欢迎页面-X-admin2.2</title>
    <meta name="renderer" content="webkit">
    <meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
    <meta name="viewport" content="width=device-width,user-scalable=yes, minimum-scale=0.4, initial-scale=0.8,target-densitydpi=low-dpi" />
    <link rel="stylesheet" href="../X-admin/css/font.css">
    <link rel="stylesheet" href="../X-admin/css/xadmin.css">
    <script type="text/javascript" src="../X-admin/lib/layui/layui.js" charset="utf-8"></script>
    <script type="text/javascript" src="../X-admin/js/xadmin.js"></script>
    <!-- 让IE8/9支持媒体查询，从而兼容栅格 -->
    <!--[if lt IE 9]>
    <script src="https://cdn.staticfile.org/html5shiv/r29/html5.min.js"></script>
    <script src="https://cdn.staticfile.org/respond.js/1.4.2/respond.min.js"></script>
    <![endif]-->
</head>
<body>
<div class="layui-fluid">
    <div class="layui-row">
        <form  method="post" enctype="multipart/form-data" action="/insertjournalism"  class="layui-form">

        </form>
    </div>
</div>
<script>layui.use(['form', 'layer'],
    function() {
        $ = layui.jquery;
        var form = layui.form,
            layer = layui.layer;

        //自定义验证规则

        //渲染数据
        var id1=localStorage.getItem("bus_driver_id");
        if (null==id1){
            id1=localStorage.getItem("bus_driver_id1");
        }
        $.ajax({
            type:"POST",
            url: "/driverIdlist",
            data:({
                driver_id:id1
            }),
            success: function (data) {
                console.log(data);
                if(data.status==200){
                    var  lists = data.data;
                    for (var i = 0; i < lists.length; i++){
                        var html = "";
                        html +=`
            <div class="layui-form-item">
                <label for="journalism_title" class="layui-form-label">
                    <span class="x-red">*</span>姓名
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="journalism_title" name="journalism_title"  value="${lists[i].driver_name}" required="" readonly lay-verify=" "
                           autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span class="x-red">*</span>姓名
                </div>
            </div>

            <div class="layui-form-item">
                <label for="driver_card" class="layui-form-label">
                    <span class="x-red">*</span>身份证号码
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="driver_card" name="driver_card" value="${lists[i].driver_card}" required="" readonly lay-verify=""
                           autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span class="x-red">*</span>
                </div>
            </div>

            <div class="layui-form-item">
                <label for="driver_personal" class="layui-form-label">
                    <span class="x-red">*</span>个人近照
                </label>
                <div class="layui-input-inline" readonly>
                           <img  style="width: 30px;height: 30px" src="/imgshows?picName=${lists[i].driver_personal}"/>
                    <input type="hidden" id="driver_personal" name="driver_personal" value="${lists[i].driver_personal}" required="" readonly lay-verify=""
                           autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span class="x-red">*</span>
                </div>
            </div>

            <div class="layui-form-item">
                <label for="driver_certificate" class="layui-form-label">
                    <span class="x-red">*</span>驾驶证照
                </label>
                <div class="layui-input-inline" readonly>
                  <img style="width: 30px;height: 30px" src="/imgshows?picName=${lists[i].driver_certificate}"/>
                    <input type="hidden" id="driver_certificate" name="driver_certificate" value="${lists[i].driver_certificate}" required="" readonly lay-verify=""
                           autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span class="x-red">*</span>
                </div>
            </div>

              <div class="layui-form-item">
                <label for="driver_fraction" class="layui-form-label">
                    <span class="x-red">*</span> 分数
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="driver_fraction" name="driver_fraction" value="${lists[i].driver_fraction}" required=""  readonly lay-verify=""
                           autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span class="x-red">*</span>
                </div>
            </div>

             <div class="layui-form-item">
                <label for="driver_remarks" class="layui-form-label">
                    <span class="x-red">*</span> 备注
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="driver_remarks" name="driver_remarks" value="${lists[i].driver_remarks}" required=""  readonly lay-verify=""
                           autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span class="x-red">*</span>
                </div>
            </div>

             <div class="layui-form-item">
                <label for="driver_s" class="layui-form-label">
                    <span class="x-red">*</span> 说明
                </label>
                <div class="layui-input-inline">
                    <input type="text" id="driver_s" name="driver_s" value="${lists[i].driver_s}" required=""  readonly lay-verify=""
                           autocomplete="off" class="layui-input">
                </div>
                <div class="layui-form-mid layui-word-aux">
                    <span class="x-red">*</span>
                </div>
            </div>
                           `
                        $('.layui-form').append(html);
                    }

                }
                if(data.status==500){
                    alert("查询失败");
                    window.location.reload();
                }
            }
        })
    });

function memberup1() {
    layer.alert("稍后片刻", {icon: 2},function () {
        var index=parent.layer.getFrameIndex(window.name);//获取当前弹出层的层级
        window.parent.location.reload();//刷新父页面
        parent.layer.close(index);//关闭弹出层
    });
    return;
}
</script>

</body>

</html>
